const mongoose = require('mongoose')

mongoose.connect('mongodb://localhost/uploader', {
    useNewUrlParser: true,
    useUnifiedTopology: true
})

const conn = mongoose.connection
conn.on('connected', () => console.log('mongooose connected.'))
conn.on('error', err => console.log(err))
conn.on('disconnected', () => console.log('mongoose disconnected.'))

require('./image')
require('./comment')